#!/bin/bash
HOST=$1
PW=$2
PORT=$3
if [ "$PORT" == "" ]; then
 PORT=22
fi
if [ "$PW" == "" ]; then
 echo "call with $0 hostname password [port]"
 exit 1
fi

./clean-images
for i in 0w 2 3 4; do
 ./compile $i
 ./create-image $i
done
for i in images/updater*; do
 sha256sum $i
done
sshpass -p $PW scp -P $PORT images/updater* $HOST:images
sshpass -p $PW scp -P $PORT images/hifiberryos*.zip $HOST:dev
